<div class="right">
    
</div>
<p class="spacer"></p>
<table class="table-list">
    <thead>
        <tr>
            <?php foreach ($header as $i => $v): ?>
            <th field="<?= $i?>" class="<?= (isset ($order[$i])&&$order[$i])?$order[$i]:'' ?>"><?= (is_array($v)?$v['label']:$v) ?></th>
            <?php endforeach;?>
            <td style="width:100px;">
                <?= generate_input_element('all',array('type'=>'checkbox','value'=>'all'))?>
            </td>
        </tr>
    </thead>
    <tbody>
        <?php if($data):?>
            <?php $data = $data->result_array()?>
            <?php $i = 0?>
            
            <?php foreach ($data as $i => $v):?>
            <?php $i++?>
            <tr class="<?= (($i%2)==0)?'odd':'even' ?>">
                <?php foreach ($header as $i2 => $v2): ?>
                
                    <td
                    <?= (is_array($v2))?generate_attributes(array_merge(array('oid'=>$v['id']),$v2)):'' ?>
                        >
                    <?= display_option($controller, $v, $i2) ?>
                    </td>
                
                <?php endforeach;?>
                <td class="center">
                    <?php $id = $v['id']?>
                    <?= anc($controller.'/index/edit/'.$id, img('standard/edit.png',array('alt'=>'Edit','title'=>'Edit'))) ?>
                    <?= img('standard/checkbox.png',array('alt'=>'Checkbox','title'=>'Checkbox','index'=>$id,'class'=>'checkbox')) ?>
                    <?= img('standard/delete.png',array('alt'=>'Delete','title'=>'Delete','index'=>$id,'class'=>'delete_this')) ?>
                    <?= generate_input_element('id[]',array('type'=>'checkbox','value'=>$id,'class'=>'boxes hide'))?>
                </td>
            </tr>
            <?php endforeach;?>
        
        <?php endif;?>
            
    </tbody>
</table>
<?= $paging?>